import request from '@/utils/request'

export const getPicInfo = () => {
  return request.get('/captcha/image')
}

export const sendSmsCaptcha = (captchaCode, captchaKey, mobile) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      captchaCode,
      captchaKey,
      mobile
    }
  })
}

export const smsCaptchaLogin = (mobile, smsCode) => {
  return request.post('/passport/login', {
    form: {
      isParty: false,
      mobile,
      partyData: [],
      smsCode
    }
  },
  {
    headers: {
      platform: 'H5'
    }
  })
}
